This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 562
fix: raise error when get invalid consensus params #1790
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmsqe
requested review from
Vvaradinov and
MalteHerrmann
and removed request for
a team
June 15, 2023 03:40
11 tasks
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1790 +/- ##
=======================================
Coverage 68.89% 68.89%
=======================================
Files 117 117
Lines 10681 10681
=======================================
Hits 7359 7359
Misses 2900 2900
Partials 422 422
|
mmsqe
added a commit
to crypto-org-chain/ethermint
that referenced
this pull request
Jun 15, 2023
* add nil check for consParams.Block * add change log * skip invalid consensus params * panic on invalid consensus params
if consParams != nil && consParams.Block.MaxGas > -1 { | ||
gasLimit = big.NewInt(consParams.Block.MaxGas) | ||
if consParams == nil || consParams.Block == nil || consParams.Block.MaxGas <= -1 { | ||
panic(fmt.Sprintf("get invalid consensus params: %s", consParams)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
mmsqe
changed the title
fix: add nil check for consParams.Block
fix: raise error when get invalid consensus params
Jun 15, 2023
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)